package com.joseph.test;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;

/**
 * @description 
 * @author Joseph_Mok
 * @date 2016年5月3日下午2:41:29
 */
public class Nio {

	public static void main(String[] args) throws IOException {
		FileInputStream fis = new FileInputStream(new File("D:/a.txt"));
		FileChannel fc = fis.getChannel();
		ByteBuffer buffer = ByteBuffer.allocate(1024);
		fc.read(buffer);
	}
}
